package com.itheima.controller;




import com.itheima.pojo.Student;
import com.itheima.service.IStudentService;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 哈纳桑
 * @since 2024-04-24
 */

public class StudentController {

    private IStudentService studentService;

    public void setStudentService(IStudentService studentService)
    {
        this.studentService = studentService;
    }

    public List<Student> getAllStudents()
    {
        List<Student> all = studentService.getAll();

        System.out.println("最终的学生数据 ："+all);

        return all;
    }

}
